<template>
  <a-month-picker :value="modelValue" :format="format" :valueFormat="format" :placeholder="placeholder" @change="changeValue" />
</template>

<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
  name: 'DateMonth',
  props: {
    modelValue: String,
    format: {
      type: String,
      default: 'YYYY-MM',
    },
    placeholder: {
      type: String,
      default: '选择月份',
    },
  },
  emits: [
    'update:modelValue',
    'change'
  ],
  data() {
    return {
    }
  },
  computed: {
  },
  methods: {
    changeValue(date, dateString) {
      this.$emit('update:modelValue', date)
      this.$emit('change', date)
    },
  },
  mounted() {
  }
})
</script>

<style scoped lang="less">

</style>
